package com.city.consumer.service;

import com.city.provider.service.TicketService;
import org.apache.dubbo.config.annotation.Reference;
import org.springframework.stereotype.Service;

/**
 * Created with IntelliJ IDEA.
 * User: Cheng
 * Date: 2020/4/24
 * Time: 18:05
 * Description: No Description
 */
@Service
public class UserService {
    //我们需要去拿去注册中心的服务//我们需要去拿去注册中心的服务
    @Reference
    TicketService ticketService;

    public void buyTicket(){
        String ticket = ticketService.getTicket();
        System.out.println("从注册中心拿到"+ticket);
    }
}
